package com.test.concurrency;

public class SerialNumberGenetator {

	private static volatile int serialNumber =0;
	public synchronized static int nextSerialNumber(){
		return serialNumber++; //not thread-safe
	}
}
